* lisp/mouse.el (mouse-yank-primary, mouse-yank-secondary):
authorSam Steingold <sds@gnu.org>
Mon, 26 Jul 2010 19:05:47 +0000 (15:05 -0400)
committerSam Steingold <sds@gnu.org>
Mon, 26 Jul 2010 19:05:47 +0000 (15:05 -0400)
Do not call `x-get-selection' the second time, reuse the value.

lisp/ChangeLog
lisp/mouse.el

index 52a618ed13ebc2b49d9b2389e7751446cccf6dbf..b35391f9c4a3352b0491877587509d8ae6def6d7 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-26  Sam Steingold  <sds@gnu.org>
+
+       * mouse.el (mouse-yank-primary, mouse-yank-secondary):
+       Do not call `x-get-selection' the second time, reuse the value.
+
 2010-07-26  Daiki Ueno  <ueno@unixuser.org>
 
        * epa-mail.el (epa-mail-mode-map): Add alternative key bindings
index 87cca4044b89546ca807dd0cc1a2d1b8dbe9e27c..7ba7b031e1ebc0c1272e7e459746d8203109d11b 100644 (file)
@@ -1282,7 +1282,7 @@ regardless of where you click."
   (or mouse-yank-at-point (mouse-set-point click))
   (let ((primary (x-get-selection 'PRIMARY)))
     (if primary
-        (insert (x-get-selection 'PRIMARY))
+        (insert primary)
       (error "No primary selection"))))
 
 (defun mouse-kill-ring-save (click)
@@ -1577,7 +1577,7 @@ regardless of where you click."
   (or mouse-yank-at-point (mouse-set-point click))
   (let ((secondary (x-get-selection 'SECONDARY)))
     (if secondary
-        (insert (x-get-selection 'SECONDARY))
+        (insert secondary)
       (error "No secondary selection"))))
 
 (defun mouse-kill-secondary ()